package com.dpteam.bean;

/**
 * Created with IntelliJ IDEA.
 * User: luolei
 * Date: 2016/1/8
 * Time: 16:02
 */
public class ImportInfo {

    /**
     * 主键ID
     */
    private int id;
    /**
     * 商品ID
     */
    private int productId;
    /**
     * 条形码
     */
    private String barcode;
    /**
     * 商品名
     */
    private String productName;
    /**
     * 商品分类ID
     */
    private int typeId;
    /**
     * 商品分类名
     */
    private String typename;
    /**
     * 进价
     */
    private float buyPrice;
    /**
     * 供应商名称
     */
    private String providerName;
    /**
     * 供应商描述
     */
    private String providerDes;
    /**
     * 数量
     */
    private int amount;
    /**
     * 操作员
     */
    private UserInfo user;
    /**
     * 入库时间
     */
    private String updateTime;
    /**
     * 总价
     */
    private float total;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("{");
        //String
        sb.append("'barcode':'").append(barcode).append("',");
        sb.append("'productName':'").append(productName).append("',");
        sb.append("'typename':'").append(typename).append("',");
        sb.append("'providerName':'").append(providerName).append("',");
        sb.append("'providerDes':'").append(providerDes).append("',");
        sb.append("'updateTime':'").append(updateTime).append("',");

        //int
        sb.append("'id':").append(id).append(",");
        sb.append("'productId':").append(productId).append(",");
        sb.append("'typeId':").append(typeId).append(",");
        sb.append("'buyPrice':").append(buyPrice).append(",");
        sb.append("'amount':").append(amount).append(",");
        sb.append("'total':").append(total).append(",");
        //json
        sb.append("'user':").append(user.toString()).append("}");
        return sb.toString();
    }

    public ImportInfo() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public int getTypeId() {
        return typeId;
    }

    public void setTypeId(int typeId) {
        this.typeId = typeId;
    }

    public String getTypename() {
        return typename;
    }

    public void setTypename(String typename) {
        this.typename = typename;
    }

    public float getBuyPrice() {
        return buyPrice;
    }

    public void setBuyPrice(float buyPrice) {
        this.buyPrice = buyPrice;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    public String getProviderDes() {
        return providerDes;
    }

    public void setProviderDes(String providerDes) {
        this.providerDes = providerDes;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public UserInfo getUser() {
        return user;
    }

    public void setUser(UserInfo user) {
        this.user = user;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public float getTotal() {
        return total;
    }

    public void setTotal(float total) {
        this.total = total;
    }
}
